package com.educatioin.manage.web.productorder.repository;

import com.educatioin.manage.web.productorder.po.ProductOrderPo;
import com.educatioin.manage.web.system.po.CustomerPo;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;

import java.util.List;

/**
 * Created by zhangchen on 2018/3/5.
 */
@RepositoryRestResource(collectionResourceRel = "productOrderRepository", path = "orderRep")
public interface ProductOrderRepository extends JpaSpecificationExecutor<ProductOrderPo>, PagingAndSortingRepository<ProductOrderPo, Long> {

    ProductOrderPo findByOrderCode(String orderCode);

    List<ProductOrderPo> findByPhone(String phone);
}
